package com.film.rowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.film.domain.User;

public class UserRowMapper implements RowMapper<User>{

	@Override
	public User mapRow(ResultSet rs, int i) throws SQLException {
		User user = new User();
		user.setuId(rs.getInt("u_id"));
		user.setuName(rs.getString("u_name"));
		user.setuPassword(rs.getString("u_password"));
		user.setuPhoneNum(rs.getString("u_phoneNum"));
		user.setuNickName(rs.getString("u_nickName"));
		user.setuSex(rs.getString("u_sex"));
		user.setuBirthday(rs.getString("u_birthday"));
		user.setuIndustry(rs.getString("u_industry"));
		user.setuLiftState(rs.getString("u_life_State"));
		user.setuSignature(rs.getString("u_signature"));
		user.setuImg(rs.getString("u_headImg"));
		return user;
	}

}
